import Vue from 'vue';
import VueResource from 'vue-resource';

Vue.use(VueResource);

const prefix = 'http://35.189.165.140:3000';

// 获取分类
const Apps = Vue.resource(`${prefix}/cats/lv2/statistics`);
export const getApps = (options) => Apps.get(options);

// 排行榜
const Ranks = Vue.resource(`${prefix}/ranking/gender`);
export const getRanks = (options) => Ranks.get(options);

// 搜索自动填充
const AutoComplete = Vue.resource(`${prefix}/book/auto-complete`);
export const getComplete = (options) => AutoComplete.get(options);

// 搜索后点击搜索出得条目
const FuzzySearch = Vue.resource(`${prefix}/book/fuzzy-search`);
export const getFuzzy = (options) => FuzzySearch.get(options);
